home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 379 < prev    next >
Text File  |  1996-08-06  |  933b  |  30 lines

  1. Newsgroups: comp.std.c
  2. Path: news.dcs.warwick.ac.uk!not-for-mail
  3. From: A.Main@dcs.warwick.ac.uk (Zefram)
  4. Subject: Re: "c" question.
  5. X-Nntp-Posting-Host: stone
  6. Message-ID: <1996Feb15.215436.272@dcs.warwick.ac.uk>
  7. X-Stardate: [-31]7059.55
  8. Sender: news@dcs.warwick.ac.uk (Network News)
  9. X-Us-Congress: Moronic fuckers
  10. Organization: Department of Computer Science, Warwick University, England
  11. References: <312048DF.4E51@vast.cs.byu.edu>
  12. Date: Thu, 15 Feb 1996 21:54:36 GMT
  13.  
  14. William Donald Peterson III  <willp@vast.cs.byu.edu> wrote:
  15. >I have a question.  I was wondering if anybody knows how to display a 
  16. >character that is not on the keyboard, but is in the alphabet.  For 
  17. >example, if I wanted to "printf" the 129th ascii character.
  18.  
  19. printf("%c",129);
  20.  
  21. is the most literal interpretation of your request.  In general,
  22. character 129 can be represented as \201 in string and character
  23. constants, so
  24.  
  25. printf("\201");
  26.  
  27. is legal.
  28.  
  29. -zefram
  30.